<extend name="public@emptypage" />
<block name="content">


  <div class="card">
            <div class="card-header card-header-primary">
              <h3 class="card-title"><?php if($code == 0):?>{:lang('Error')}<?php else:?>{:lang('Success')}<?php endif;?></h3>
            </div>
            <div class="card-body">
              <div class="center">
                  <div class="alert <?php if($code == 0):?>alert-danger<?php else:?>alert-success<?php endif;?> alert-with-icon" data-notify="container">
                    <i class="material-icons" data-notify="icon">add_alert</i>
                    
                    <span data-notify="message"><?php echo(strip_tags($msg));?>
                                  Page will return after <b id="wait"><?php echo($wait);?></b>s Or 
                                  <a href="{:$url}" id="href" style="text-decoration: underline;">go to direct.</a></span>
                  </div>
              </div>
            </div>




</div>
</block>

<block name="script">
    <script type="text/javascript">
        (function(){
            var wait = document.getElementById('wait'),
                href = document.getElementById('href').href;
            // var interval = setInterval(function(){
            //     var time = --wait.innerHTML;
            //     if(time <= 0) {
            //         location.href = href;
            //         clearInterval(interval);
            //     };
            // }, 1000);
        })();
    </script>
</block>
